package org.datamining.guha.model.node;

import org.datamining.guha.model.Formatter;
/**
 * Just the {@link Node} without parent or childs.
 * @author Lukas Vlcek
 *
 */
public class NodeFormatter implements Formatter<Node> {

	private static final String root = "Root";
	
	public String format(Node node) {
        StringBuffer sb = new StringBuffer();
        if (node.getLiteral() != null) {
            sb.append(node.getLiteral().toString());
        } else {
            sb.append(root);
        }
        return sb.toString();
	}

}
